package com.ruoyi.order.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.order.mapper.OrderDetailsMapper;
import com.ruoyi.order.domain.OrderDetails;
import com.ruoyi.order.service.IOrderDetailsService;

/**
 * 订单细节Service业务层处理
 *
 * @author ruoyi
 * @date 2024-12-07
 */
@Service
public class OrderDetailsServiceImpl implements IOrderDetailsService
{
    @Autowired
    private OrderDetailsMapper orderDetailsMapper;

    /**
     * 查询订单细节
     *
     * @param id 订单细节主键
     * @return 订单细节
     */
    @Override
    public OrderDetails selectOrderDetailsById(Long id)
    {
        return orderDetailsMapper.selectOrderDetailsById(id);
    }

    /**
     * 查询订单细节列表
     *
     * @param orderDetails 订单细节
     * @return 订单细节
     */
    @Override
    public List<OrderDetails> selectOrderDetailsList(OrderDetails orderDetails)
    {
        return orderDetailsMapper.selectOrderDetailsList(orderDetails);
    }

    /**
     * 新增订单细节
     *
     * @param orderDetails 订单细节
     * @return 结果
     */
    @Override
    public int insertOrderDetails(OrderDetails orderDetails)
    {
        return orderDetailsMapper.insertOrderDetails(orderDetails);
    }

    /**
     * 修改订单细节
     *
     * @param orderDetails 订单细节
     * @return 结果
     */
    @Override
    public int updateOrderDetails(OrderDetails orderDetails)
    {
        return orderDetailsMapper.updateOrderDetails(orderDetails);
    }

    /**
     * 批量删除订单细节
     *
     * @param ids 需要删除的订单细节主键
     * @return 结果
     */
    @Override
    public int deleteOrderDetailsByIds(Long[] ids)
    {
        return orderDetailsMapper.deleteOrderDetailsByIds(ids);
    }

    /**
     * 删除订单细节信息
     *
     * @param id 订单细节主键
     * @return 结果
     */
    @Override
    public int deleteOrderDetailsById(Long id)
    {
        return orderDetailsMapper.deleteOrderDetailsById(id);
    }
}
